<?php

namespace app\validate;

use think\Validate;

class LoginValidate extends Validate
{
    // 验证规则
    protected $rule = [
        'username' => 'require',
        'password' => 'require|min:6',
    ];

    // 自定义错误提示信息
    protected $message = [
            'username.require' => '用户名不能为空',
            'password.require' => '密码不能为空',
            'password.min'     => '密码至少为6位',
    ];
}
